
public class Dependency {
	
	String myType;
	Instruction destination;
	String register;
	
	public Dependency(String type, Instruction dest, String reg)
	{
		myType = type;
		destination = dest;
		register = reg;
	}
        
        public Dependency(String type, Instruction dest)
        {
            myType = type;
            destination = dest;
            register = "";
        }
	
	public String toString()
	{
            String retstr = " has a " + myType + " dependence on " + destination.name 
                        + " at " + destination.myCount;
            if(!register.equals(""))
		return retstr + " via " + register;
            else
                return retstr;
	}

}
